home *** CD-ROM | disk | FTP | other *** search
/ Windows 6-Pak - Disc 4 / Windows 6-Pak (InfoMagic) (Disc 4) (1999).ISO / Text-Chat-Scripts / pp-320m.exe / pp300 / p-other2.mrc < prev    next >
Text File  |  1998-01-05  |  30KB  |  732 lines

  1. ; -----------------------------------------------------
  2. ; Peace and Protection (by misspai)
  3. ; -----------------------------------------------------
  4. ; Custom window popups (loads
  5. ; into remotes) (Second section)
  6. ; -----------------------------------------------------
  7. ; Port scan window
  8. ; -----------------------------------------------------
  9. menu @Ports {
  10.   dclick /if ($1 < 5) halt | server $gettok($window(@ports).titlebar,2,32) $remove($remove($strip($gettok($line(@ports,$1),2,32)),[),])
  11.   Connect to port...:if ($sline(@ports,1).ln < 5) halt | server $gettok($window(@ports).titlebar,2,32) $remove($remove($strip($gettok($sline(@ports,1),2,32)),[),])
  12.   -
  13.   %_port.pop1:{
  14.     _dosort @ports 5 4  75
  15.     unset %_port.pop1
  16. set %_port.pop2 Sort by port number
  17. rline @Ports 2 Currently sorted by speed (fastest ports first)
  18.   }
  19.   %_port.pop2:{
  20.     _dosort @ports 5 2 $chr(91) 93
  21.     unset %_port.pop2
  22.     set %_port.pop1 Sort by port speed
  23.     rline @Ports 2 Currently sorted by port number
  24.   }
  25.   Get new list:ports
  26.   -
  27.   Copy to clipboard:if ($sline(@ports,1).ln < 5) halt | clipboard $_stripout($sline(@ports,1))
  28.   -
  29.   Close:window -c @Ports
  30.   Help:help ! ports window popups
  31. }
  32. ; -----------------------------------------------------
  33. ; Blacklist editor
  34. ; -----------------------------------------------------
  35. menu @Blacklist {
  36.   $_exec(set %.sel [ $sline(@Blacklist,0) ] ):{ }
  37.   Remove $_plural2(entry,entries,%.sel):_doBsel k
  38.   -
  39.   Change $_plural(reason,%.sel) $+ ...:_doBsel r
  40.   Change $_plural(mask,%.sel)
  41.   .*!*@*.domain.com:_doBsel d
  42.   .Enter new mask...:_doBsel m
  43.   -
  44.   Change channel
  45.   .All channels:_doBsel a
  46.   .Specific channel...:set %_arhelp _doBsel s | _askr _arhelp New target channel?
  47.   Add a channel...:set %_arhelp _doBsel c | _askr _arhelp Channel to add to targets?
  48.   -
  49.   Clear blacklist:_Bselall | _doBsel k
  50.   Select all entries:_Bselall
  51.   Close:window -c @Blacklist
  52.   -
  53.   Help:help ! blacklist editor popups
  54. }
  55. alias _Bselall sline @Blacklist 4 | set %.tog.num $line(@Blacklist,0) | :loop | sline -a @Blacklist %.tog.num | if ($_vd(.tog.num) > 3) goto loop
  56. alias _doBsel {
  57.   if ($sline(@Blacklist,1).ln < 4) halt
  58.   set %.p2 $2
  59.   :loop
  60.   set %.line $strip($sline(@Blacklist,1))
  61.   if (%.line == $null) halt
  62.   set %.addr $gettok(%.line,1,9)
  63.   set %.fromd $gettok(%.line,2,9)
  64.   set %.why $gettok(%.line,3-,9)
  65.   if (%.fromd == alláchannels) unset %.from
  66.   else set %.from %.fromd
  67.   if ($1 == k) { black %.from %.addr -k | dline @Blacklist $sline(@Blacklist,1).ln }
  68.   elseif ($1 == d) {
  69.     set %.newaddr $_ppmask(%.addr,4)
  70.     black %.from %.newaddr -s -w %.why | black %.from %.addr -k
  71.     rline @Blacklist $sline(@Blacklist,1).ln %col.dark $+ %.newaddr $+      $+ %col.target $+ %.fromd $+      $+ %col.base $+ %.why
  72.   }
  73.   elseif ($1 == a) {
  74.     black %.addr -s -w %.why | black %.from %.addr -k
  75.     rline @Blacklist $sline(@Blacklist,1).ln %col.dark $+ %.addr $+      $+ %col.target $+ alláchannels $+      $+ %col.base $+ %.why
  76.   }
  77.   elseif ($1 == s) {
  78.     black $2 %.addr -s -w %.why | black %.from %.addr -k
  79.     rline @Blacklist $sline(@Blacklist,1).ln %col.dark $+ %.addr $+      $+ %col.target $+ $2 $+      $+ %col.base $+ %.why
  80.   }
  81.   elseif ($1 == c) {
  82.     black $2 %.addr -s -w %.why
  83.     iline @Blacklist $_i($sline(@Blacklist,1).ln) %col.dark $+ %.addr $+      $+ %col.target $+ $2 $+      $+ %col.base $+ %.why
  84.     sline -r @Blacklist $sline(@Blacklist,1).ln
  85.   }
  86.   elseif ($1 == m) {
  87.     if (%.p2 == $null) { set %_arhelp _doBsel m | _pentry _arhelp $+ %.addr New mask for %col.custdark $+ %.addr $+ ? }
  88.     black %.from %.p2 -s -w %.why | black %.from %.addr -k
  89.     rline @Blacklist $sline(@Blacklist,1).ln %col.dark $+ %.p2 $+      $+ %col.target $+ %.fromd $+      $+ %col.base $+ %.why
  90.     unset %.p2
  91.   }
  92.   elseif ($1 == r) {
  93.     if (%.p2 == $null) { set %_arhelp _doBsel r | _pentry _arhelp $+ $_s2p(%.why) New reason for %col.custdark $+ %.addr $+ ? }
  94.     black %.from %.addr -s $2-
  95.     rline @Blacklist $sline(@Blacklist,1).ln %col.dark $+ %.addr $+      $+ %col.target $+ %.fromd $+      $+ %col.base $+ $2-
  96.     unset %.p2
  97.   }
  98.   else halt
  99.   goto loop
  100. }
  101. ; -----------------------------------------------------
  102. ; Userlist editor
  103. ; -----------------------------------------------------
  104. menu @Userlevel {
  105.   dclick /window -c $active | if ($_isopen(@Userlist)) window @Userlist $_winpos(7%,7%,7%,7%)
  106.   Close window:window -c $active | if ($_isopen(@Userlist)) window @Userlist $_winpos(7%,7%,7%,7%)
  107. }
  108. on 1:close:@Userlevel:if ($_isopen(@Userlist)) window @Userlist $_winpos(7%,7%,7%,7%)
  109. menu @Userlist {
  110.   dclick /_doUsel n
  111.   Remove entry:_doUsel k
  112.   Add new user...:_askr _Uadd Nickname or address of new user?
  113.   -
  114.   Display help...:_ULhelp
  115.   -
  116.   Change basic level
  117.   .1    (none):_doUsel + 1
  118.   .50    (safe):_doUsel + 50
  119.   .75    (protected):_doUsel + 75
  120.   .-
  121.   .175    (ctcp do)
  122.   ..Yes, I am sure I want this user to be able to make my computer do whatever they tell it to do
  123.   ...I am absolutely sure
  124.   ....Positively sure
  125.   .....I definately want this user to have this access
  126.   ......Just add the damn do access and quit giving me stupid warnings!:_doUsel + 175
  127.   .-
  128.   .Custom...:set %_arhelp _doUsel + | _askr _arhelp Custom level?
  129.   Add sub-level
  130.   .chat    (autoaccept):_doUsel + chat
  131.   .send    (autoaccept):_doUsel + send
  132.   .nodcc    (ignore dccs):_doUsel + nodcc
  133.   .voice    (autovoice):_doUsel + voice
  134.   .nopw    (autoop w/o pw):_doUsel + nopw
  135.   .-
  136.   .Custom...:set %_arhelp _doUsel2 + | _askr _arhelp Custom level?
  137.   Remove sub-level
  138.   .chat    (autoaccept):_doUsel - chat
  139.   .send    (autoaccept):_doUsel - send
  140.   .nodcc    (ignore dccs):_doUsel - nodcc
  141.   .voice    (autovoice):_doUsel - voice
  142.   .nopw    (autoop w/o pw):_doUsel - nopw
  143.   .-
  144.   .Custom...:set %_arhelp _doUsel2 - | _askr _arhelp Custom level?
  145.   Op access
  146.   .Add a channel...:set %_arhelp _doUsel + op | _askr _arhelp Channel to add op access on?
  147.   .Add all channels:_doUsel + op
  148.   .-
  149.   .Remove all:_doUsel - op
  150.   .Remove a channel...:set %_arhelp _doUsel - op | _askr _arhelp Channel to remove op access on?
  151.   Nicklist color
  152.   .Off:_doUsel c
  153.   .Select
  154.   ..00    (white):_doUsel c 00
  155.   ..01    (black):_doUsel c 01
  156.   ..02    (dk blue):_doUsel c 02
  157.   ..03    (dk green):_doUsel c 03
  158.   ..04    (lt red):_doUsel c 04
  159.   ..05    (dk red):_doUsel c 05
  160.   ..06    (dk purple):_doUsel c 06
  161.   ..07    (orange):_doUsel c 07
  162.   ..08    (yellow):_doUsel c 08
  163.   ..09    (lt green):_doUsel c 09
  164.   ..10    (dk cyan):_doUsel c 10
  165.   ..11    (lt cyan):_doUsel c 11
  166.   ..12    (lt blue):_doUsel c 12
  167.   ..13    (lt purple):_doUsel c 13
  168.   ..14    (dk grey):_doUsel c 14
  169.   ..15    (lt grey):_doUsel c 15
  170.   -
  171.   Change $_plural(mask,%.sel)
  172.   .*!*@*.domain.com:_doUsel d
  173.   .*!*identd@*:_doUsel i
  174.   .Enter new mask...:_doUsel m
  175.   Change nickname
  176.   .Grab current visible nicknames:_doUsel n !
  177.   .Enter new nickname...:_doUsel n
  178.   -
  179.   Bulk selection
  180.   .All entries:_Uselall
  181.   .-
  182.   .Nickname
  183.   ..matching a name/mask...:set %_arhelp _Ubulksel n | _askr _arhelp Nickname or wildcard mask (ex: *gam*) to match?
  184.   .Mask
  185.   ..matching a wildcard mask...:set %_arhelp _Ubulksel m | _askr _arhelp Wildcard mask (ex: *!*@*.aol.com) to match?
  186.   ..matching a user...:set %_arhelp _Ubulksel u | _askr _arhelp Find matching entry(s) by address for what user? (enter nickname or full address)
  187.   .Main level
  188.   ..below...:set %_arhelp _Ubulksel < | _askr _arhelp Select all users with main level below what value?
  189.   ..above...:set %_arhelp _Ubulksel > | _askr _arhelp Select all users with main level above what value?
  190.   ..-
  191.   ..equal to...:set %_arhelp _Ubulksel == | _askr _arhelp Select all users with main level equal to what value?
  192.   ..not equal to...:set %_arhelp _Ubulksel != | _askr _arhelp Select all users with main level not equal to what value?
  193.   .Sublevel
  194.   ..equal to...:set %_arhelp _Ubulksel s | _askr _arhelp Select all users with what sublevel?
  195.   ..not equal to...:set %_arhelp _Ubulksel w | _askr _arhelp Select all users without what sublevel?
  196.   ..-
  197.   ..Any sublevel:_Ubulksel w (none)
  198.   ..No sublevel:_Ubulksel s (none)
  199.   .Op access
  200.   ..on a specific channel...:set %_arhelp _Ubulksel o | _askr _arhelp Select all users with op access on what channel?
  201.   ..on all channels:_Ubulksel o any
  202.   ..-
  203.   ..on at least one channel:_Ubulksel a !=
  204.   ..on no channels:_Ubulksel a ==
  205.   .Timestamp
  206.   ..older than...:set %_arhelp _Ubulksel >= | _askr _arhelp Select entries that are at least how many days old? (decimals ok)
  207.   ..newer than...:set %_arhelp _Ubulksel <= | _askr _arhelp Select entries that are newer than how many days? (decimals ok)
  208.   Close:window -c @Userlist | window -c @Userlevel
  209.   -
  210.   Help:help ! userlist editor popups
  211. }
  212. on 1:close:@Userlist:window -c @Userlevel
  213. alias _Uselall sline @Userlist 5 | set %.tog.num $line(@Userlist,0) | :loop | sline -a @Userlist %.tog.num | if ($_vd(.tog.num) > 4) goto loop
  214. alias _doUsel2 _doUsel $1 @ $+ $2
  215. alias _Uadd {
  216.   if ($_ismask($1)) {
  217.     set %.addr $1
  218.     if (* !isin %.addr) set %.addr $_ppmask(%.addr,3)
  219.   }
  220.   elseif ($address($1,5) == $null) _lookup $1 3 _Uadd ,
  221.   else set %.addr $_ppmask($1,3)
  222.   userlevel %.addr 1 -q
  223.   _ULaline %.addr $_i($line(@Userlist,0))
  224.   sline @Userlist $line(@Userlist,0)
  225. }
  226. ; -----------------------------------------------------
  227. ; Away log
  228. ; -----------------------------------------------------
  229. menu @Away {
  230.   dclick /_aquery $active $1
  231.   Query:_aquery $active $sline($active,1).ln
  232.   -
  233.   Split
  234.   .Messages
  235.   ..Private...:_afilter $active mp ! private messages
  236.   ..Channel...:_afilter $active mc ! channel messages
  237.   ..-
  238.   ..All...:_afilter $active m ! messages
  239.   .Notices
  240.   ..Pivate...:_afilter $active np ! private notices
  241.   ..Op...:_afilter $active no ! op notices
  242.   ..Channel...:_afilter $active nc ! channel notices
  243.   ..-
  244.   ..All...:_afilter $active n ! notices
  245.   .Events
  246.   ..Modes/etc...:_afilter $active ed ! mode changes
  247.   ..File/etc...:_afilter $active ef ! file events
  248.   ..Other...:_afilter $active eo ! misc. events
  249.   ..-
  250.   ..All...:_afilter $active e ! events
  251.   View
  252.   .Messages
  253.   ..Private...:_afilter $active mp !! private messages
  254.   ..Channel...:_afilter $active mc !! channel messages
  255.   ..-
  256.   ..All...:_afilter $active m !! messages
  257.   .Notices
  258.   ..Private...:_afilter $active np !! private notices
  259.   ..Op...:_afilter $active no !! op notices
  260.   ..Channel...:_afilter $active nc !! channel notices
  261.   ..-
  262.   ..All...:_afilter $active n !! notices
  263.   .Events
  264.   ..Modes/etc...:_afilter $active ed !! mode changes
  265.   ..File/etc...:_afilter $active ef !! file events
  266.   ..Other...:_afilter $active eo !! misc. events
  267.   ..-
  268.   ..All...:_afilter $active e !! events
  269.   Filter
  270.   .Messages
  271.   ..Private:_afilter $active mp
  272.   ..Channel:_afilter $active mc
  273.   ..-
  274.   ..All:_afilter $active m
  275.   .Notices
  276.   ..Private:_afilter $active np
  277.   ..Op:_afilter $active no
  278.   ..Channel:_afilter $active nc
  279.   ..-
  280.   ..All:_afilter $active n
  281.   .Events
  282.   ..Modes/etc:_afilter $active ed
  283.   ..File/etc:_afilter $active ef
  284.   ..Other:_afilter $active eo
  285.   ..-
  286.   ..All:_afilter $active e
  287.   -
  288.   Clipboard:clipboard $sline($active,1)
  289.   Save...:set %_arhelp _aLsave $active | _askr _arhelp Filename to save awaylog to?
  290.   -
  291.   Flush:alog f
  292.   Close:window -c $active
  293.   -
  294.   Help:help ! away log popups
  295. }
  296. alias _aLsave savebuf $1- | _recfile2 $2-
  297. alias _aqhelp _aquery $active $sline($active,1).ln
  298. alias _aquery {
  299.   set %.who $_aLnick($1,$2)
  300.   if (%.who == $null) return
  301.   q %.who
  302.   set %.num 1
  303.   set %.max $line($1,0)
  304.   :loop
  305.   if ($_aLnick($1,%.num) == %.who) {
  306.     set %.line $line($1,%.num)
  307.     if ($left(%.line,1) == [) set %.line $gettok(%.line,2-,32)
  308.     if ($left(%.line,1) == *) echo $colour(act) -i2 %.who * $_rchop(1,%.line)
  309.     else echo $colour(norm) -i2 %.who %.line
  310.     dline $1 %.num
  311.     dec %.num | dec %.max
  312.   }
  313.   if ($_vi(.num) <= %.max) goto loop
  314. }
  315. alias _aLnick {
  316.   if ($2 < 1) return
  317.   set %.line $line($1,$2)
  318.   if (: isin %.line) return
  319.   set %.nick $gettok(%.line,1,32)
  320.   if ([ isin %.nick) set %.nick $gettok(%.line,2,32)
  321.   if (* isin %.nick) set %.nick $remove(%.nick,*)
  322.   elseif (< isin %.nick) set %.nick $remove($remove(%.nick,<),>)
  323.   else return
  324.   return %.nick
  325. }
  326. alias _afilter {
  327.   if (! isin $3) {
  328.     set %.num 2
  329.     :loop1
  330.     set %.win @Away $+ %.num
  331.     if ($window(%.win) != $null) { inc %.num | goto loop1 }
  332.     window -nl %.win /_aqhelp @Away %font.basic
  333.     titlebar %.win - Away log split ( $+ $4- $+ )
  334.   }
  335.   else unset %.win
  336.   set %.num 1
  337.   set %.max $line($1,0)
  338.   set %.scan %@ $+ 
  339.   :loop2
  340.   set %.line $line($1,%.num)
  341.   if ($left(%.line,1) == [) set %.line $gettok(%.line,2-,32)
  342.   set %.bit $left(%.line,1)
  343.   if (%.bit isin *<) {
  344.     if (: isin %.line) set %.type mc
  345.     else set %.type mp
  346.   }
  347.   elseif (%.bit == -) {
  348.     if (: isin %.line) {
  349.       if ($left(%.line,2) == -@) set %.type no
  350.       else set %.type nc
  351.     }
  352.     else set %.type np
  353.   }
  354.   else {
  355.     if (%.scan isin %.line) {
  356.       if ((to isin %.line) || (from isin %.line) || (with isin %.line)) set %.type ef
  357.       else set %.type eo
  358.     }
  359.     else set %.type ed
  360.   }
  361.   if ($2 isin %.type) {
  362.     if (%.win != $null) aline %.win $line($1,%.num)
  363.     if ($3 != !!) { dline $1 %.num | dec %.num | dec %.max }
  364.   }
  365.   if ($_vi(.num) <= %.max) goto loop2
  366.   if (%.win != $null) window -bar %.win
  367. }
  368. ; -----------------------------------------------------
  369. ; CD Player
  370. ; -----------------------------------------------------
  371. menu @CD {
  372.   dclick /if ($1 == 1) _cddc | elseif ($1 == 2) cdtrack 1 -q | elseif ($1 == 4) cdedit title | elseif ($1 == 5) cdedit artist | elseif ($1 > 6) { if (%cdp.click == edit) cdedit $calc($1 - 6) | else cdtrack $calc($1 - 6) -q }
  373.   Edit..:set %.ln $sline(@CD,1).ln | if (%.ln == 4) cdedit title | elseif (%.ln == 5) cdedit artist | elseif (%.ln > 6) cdedit $calc(%.ln - 6)
  374.   Play track:_cdtt -q
  375.   Play track to
  376.   .$chan(1):_cdtt $chan(1)
  377.   .$chan(2):_cdtt $chan(2)
  378.   .$chan(3):_cdtt $chan(3)
  379.   .$chan(4):_cdtt $chan(4)
  380.   .$chan(5):_cdtt $chan(5)
  381.   .$chan(6):_cdtt $chan(6)
  382.   .$chan(7):_cdtt $chan(7)
  383.   .$chan(8):_cdtt $chan(8)
  384.   .$chan(9):_cdtt $chan(9)
  385.   .$chan(10):_cdtt $chan(10)
  386.   .-
  387.   .$chat(1):_cdtt $chat(1)
  388.   .$chat(2):_cdtt $chat(2)
  389.   .$chat(3):_cdtt $chat(3)
  390.   .$chat(4):_cdtt $chat(4)
  391.   .$chat(5):_cdtt $chat(5)
  392.   .-
  393.   .$query(1):_cdtt $query(1)
  394.   .$query(2):_cdtt $query(2)
  395.   .$query(3):_cdtt $query(3)
  396.   .$query(4):_cdtt $query(4)
  397.   .$query(5):_cdtt $query(5)
  398.   -
  399.   Double click will
  400.   .$_dynpop($_if( [ edit ] == [ %cdp.click ] )) Edit track:_cddc edit
  401.   .$_dynpop($_if( [ edit ] != [ %cdp.click ] )) Play track:_cddc play
  402.   -
  403.   Play CD:cdtrack 1 -q
  404.   Close:window -c @CD
  405.   -
  406.   Help:help ! cd info popups
  407. }
  408. ; -----------------------------------------------------
  409. ; Protection settings
  410. ; -----------------------------------------------------
  411. menu @Protection {
  412.   dclick /_peditl $1
  413.   Edit setting...:_peditl $sline(@Protection,1).ln
  414.   -
  415.   Disable:set %.nummie $sline(@Protection,0) | :loop | _peditl $sline(@Protection,%.nummie).ln $chr(160) | if ($_vd(.nummie) > 0) goto loop
  416.   Default value:set %.nummie $sline(@Protection,0) | :loop | _peditl $sline(@Protection,%.nummie).ln  | if ($_vd(.nummie) > 0) goto loop
  417.   -
  418.   View global settings:protedit
  419.   View channel settings
  420.   .$chan(1):protedit $chan(1)
  421.   .$chan(2):protedit $chan(2)
  422.   .$chan(3):protedit $chan(3)
  423.   .$chan(4):protedit $chan(4)
  424.   .$chan(5):protedit $chan(5)
  425.   .$chan(6):protedit $chan(6)
  426.   .$chan(7):protedit $chan(7)
  427.   .$chan(8):protedit $chan(8)
  428.   .$chan(9):protedit $chan(9)
  429.   .$chan(10):protedit $chan(10)
  430.   .-
  431.   .Other...:_askr protedit Channel to view settings for?
  432.   -
  433.   Close:window -c $active
  434. }
  435. on 1:close:@Protection:window -c @Setting | window -c @ListSetting | window -c @WhoisOnJoin
  436. menu @Setting {
  437.   dclick /_psetclk $1
  438.   Modify...:_psetclk $sline(@Setting,1).ln
  439.   -
  440.   Add action...:_psetclk %_prot.ln4
  441.   Delete action:set %.nummie $sline(@Setting,0) | :loop | set %.catch22 $sline(@Setting,%.nummie).ln | if ((%.catch22 >= %_prot.ln2) && (%.catch22 <= %_prot.ln3)) _psetclk %.catch22 $chr(160) | if ($_vd(.nummie) > 0) goto loop
  442.   -
  443.   Disable all:_psetclk %_prot.ln5
  444.   Default settings:_psetclk %_prot.ln6
  445.   -
  446.   Close:window -c $active
  447. }
  448. menu @ListSetting {
  449.   dclick /_lsetclk $1
  450.   Modify...:_lsetclk $sline(@ListSetting,1).ln
  451.   Delete:set %.nummie $sline(@ListSetting,0) | :loop | _lsetclk $sline(@ListSetting,%.nummie).ln $chr(160) | if ($_vd(.nummie) > 0) goto loop
  452.   Add...:_lsetclk $line(@ListSetting,0)
  453.   -
  454.   Close:window -c $active
  455. }
  456. ; -----------------------------------------------------
  457. ; Configuration
  458. ; -----------------------------------------------------
  459. menu @Config {
  460.   dclick /_consel $1
  461.   Select...:_consel $sline(@Config,1).ln
  462.   %_condef1:set %.nummie $sline(@Config,0) | :loop | _consel $sline(@Config,%.nummie).ln  | if ($_vd(.nummie) > 0) goto loop
  463.   %_condef2:set %.nummie $sline(@Config,0) | :loop | _consel $sline(@Config,%.nummie).ln  f | if ($_vd(.nummie) > 0) goto loop
  464.   -
  465.   Close:window -c $active
  466.   Help:help ! configuration
  467. }
  468. on 1:close:@Config:window -c @Option | window -c @SoundDirs
  469. menu @Option {
  470.   dclick /_conopt $1
  471.   Select...:_conopt $sline(@Option,1).ln
  472.   -
  473.   Close:window -c $active
  474. }
  475. menu @CTCP {
  476.   dclick /_ce.sel $1
  477.   Select...:_ce.sel $sline(@CTCP,1).ln
  478.   Delete:_ce.sel $sline(@CTCP,1).ln $chr(160)
  479.   Default:_ce.sel $sline(@CTCP,1).ln !
  480.   Random...:_ce.sel $sline(@CTCP,1).ln ?
  481.   -
  482.   Close:window -c $active
  483. }
  484. menu @Sample {
  485.   dclick /_sample
  486.   Refresh:_sample
  487.   -
  488.   Close:window -c @Sample | window -c @ColorConfig | window -c @Schemes
  489. }
  490. on 1:close:@Sample:window -c @ColorConfig | window -c @Schemes
  491. menu @ColorConfig {
  492.   dclick _clredit $1
  493.   Modify...:_clredit $sline(@ColorConfig,1).ln
  494.   Schemes...:_clredit 2
  495.   -
  496.   Close:window -c @Sample | window -c @ColorConfig | window -c @Schemes
  497. }
  498. on 1:close:@ColorConfig:window -c @Sample
  499. menu @Schemes {
  500.   dclick _scmsel $1
  501.   Select...:_scmsel $sline(@Schemes,1).ln
  502.   -
  503.   Edit colors...:_scmsel 5
  504.   Rename scheme...:_scmsel 3
  505.   -
  506.   Save changes to sheme:_scmsel 6
  507.   Save as new scheme...:_scmsel 7
  508.   New
  509.   ."blank" scheme...:_scmsel 8
  510.   ."quick" scheme...:_scmsel 10
  511.   -
  512.   Delete schemes...:_scmsel 9
  513.   -
  514.   Scheme distribution
  515.   .Export scheme file...:_scmsel 12
  516.   .Import scheme file...:_scmsel 13
  517.   .-
  518.   .Send scheme via CTCP...:_scmsel 14
  519.   -
  520.   Close:window -c @Sample | window -c @ColorConfig | window -c @Schemes
  521. }
  522. on 1:close:@Schemes:window -c @Sample
  523. menu @Fonts {
  524.   Close:_fontclose
  525. }
  526. alias -l _fontclose { window -c @BasicFont | window -c @FixedFont | window -c @PopupFont | window -c @BasicSample | window -c @FixedSample | window -c @PopupSample }
  527. on 1:close:@*Font:_fontclose
  528. on 1:close:@*Sample:_fontclose
  529. menu @Elements {
  530.   Close:_elemclose
  531. }
  532. alias -l _elemclose { window -c @Seperator | window -c @Brackets | window -c @Logos }
  533. on 1:close:@Seperator:_elemclose
  534. on 1:close:@Brackets:_elemclose
  535. on 1:close:@Logos:_elemclose
  536. menu @SoundDirs {
  537.   dclick /_sdirclk $1
  538.   Modify...:_sdirclk $sline(@SoundDirs,1).ln
  539.   Delete:set %.nummie $sline(@SoundDirs,0) | :loop | _sdirclk $sline(@SoundDirs,%.nummie).ln $chr(160) | if ($_vd(.nummie) > 0) goto loop
  540.   Add...:_sdirclk $line(@SoundDirs,0)
  541.   -
  542.   Close:window -c $active
  543. }
  544. ; -----------------------------------------------------
  545. ; Various automatic logs (although
  546. ; all optional.)
  547. ; -----------------------------------------------------
  548. #activitylog on
  549. alias _fixts {
  550.   set %.ts $timestamp
  551.   if ($len(%.ts) == 6) return $replace(%.ts,[,[0)
  552.   return %.ts
  553. }
  554. alias _alog write $_wrapfile($logdirActivity.Log) $left($adate,5) $_fixts $1 $_rpad(15,.,$2) $_rpad(5,.,$3) $_lpad(20,.,$4) $5-
  555. alias _alogban {
  556.   if ($1- == $null) set %.logban : "no matching users"
  557.   else set %.logban : " $+ $1- $+ "
  558.   if (. isin $nick) _alog +b $chan BAN Server banned $banmask $+ %.logban ( $+ $nick $+ )
  559.   else _alog +b $chan BAN $nick banned $banmask $+ %.logban ( $+ $address $+ )
  560. }
  561. on 1:unban:#:_alog -b $chan UNBAN $nick unbanned $banmask ( $+ $address $+ )
  562. on 1:op:#:_alog +o $chan OP $nick opped $opnick ( $+ $address $+ / $+ $gettok($address($opnick,5),2,33) $+ )
  563. on 1:serverop:#:_alog +o $chan OP Server opped $opnick ( $+ $nick $+ / $+ $gettok($address($opnick,5),2,33) $+ )
  564. on 1:deop:#:if (. isin $nick) _alog -o $chan DEOP Server deopped $opnick ( $+ $nick $+ ) | else _alog -o $chan DEOP $nick deopped $opnick ( $+ $address $+ / $+ $gettok($address($opnick,5),2,33) $+ )
  565. on 1:voice:#:if (. isin $nick) _alog +v $chan VOICE Server voiced $vnick ( $+ $nick $+ ) | else _alog +v $chan VOICE $nick voiced $vnick ( $+ $address $+ / $+ $gettok($address($vnick,5),2,33) $+ )
  566. on 1:devoice:#:if (. isin $nick) _alog -v $chan DEVOC Server devoiced $vnick ( $+ $nick $+ ) | else _alog -v $chan DEVOC $nick devoiced $vnick ( $+ $address $+ / $+ $gettok($address($vnick,5),2,33) $+ )
  567. on 1:join:#:_alog >j $chan JOIN $nick joined ( $+ $address $+ )
  568. on 1:part:#:if ($1 != $null) _alog <p $chan PART $nick parted: " $+ $strip($1-) $+ " ( $+ $address $+ ) | else _alog <p $chan PART $nick parted ( $+ $address $+ )
  569. on 1:kick:#:if (. isin $nick) _alog <k $chan KICK Server kicked $knick $+ : " $+ $strip($1-) $+ " ( $+ $nick $+ / $+ $gettok($address($knick,5),2,33) $+ ) | else _alog <k $chan KICK $nick kicked $knick $+ : " $+ $strip($1-) $+ " ( $+ $address $+ / $+ $gettok($address($knick,5),2,33) $+ )
  570. on 1:nick:if ($comchan($newnick,0) == 1) _alog *n $comchan($newnick,1) NICK $nick became $newnick ( $+ $address $+ ) | else _alog *n ( $+ $comchan($newnick,0) $+ channels) NICK $nick became $newnick ( $+ $address $+ )
  571. on 1:mode:#:_alog $left($1,2) $chan MODE $nick set $1- ( $+ $address $+ )
  572. on 1:servermode:#:_alog $left($1,2) $chan MODE Server set $1- ( $+ $nick $+ )
  573. on 1:quit:if ($comchan($nick,0) == 1) _alog <q $comchan($nick,1) QUIT $nick quit: " $+ $strip($1-) $+ " ( $+ $address $+ ) | else _alog <q ( $+ $comchan($nick,0) $+ channels) QUIT $nick quit: " $+ $strip($1-) $+ " ( $+ $address $+ )
  574. on 1:topic:#:if (. isin $nick) else _alog *t $chan TOPIC Server topic: " $+ $strip($1-) $+ " ( $+ $nick $+ ) | else _alog *t $chan TOPIC $nick topic: " $+ $strip($1-) $+ " ( $+ $address $+ )
  575. #activitylog end
  576. #dcclog on
  577. on 1:open:=:if ($nick != $me) write $_wrapfile($logdirDCC.Log) $left($adate,5) $_fixts DCC Chat opened with $nick ( $+ $chat($nick).ip $+ )
  578. on 1:close:=:if ($nick == $me) return | if ($chat($nick).ip == $null) write $_wrapfile($logdirDCC.Log) $left($adate,5) $_fixts DCC Chat canceled with $nick | else write $_wrapfile($logdirDCC.Log) $left($adate,5) $_fixts DCC Chat closed with $nick ( $+ $chat($nick).ip $+ )
  579. on 1:open:!:write $_wrapfile($logdirDCC.Log) $left($adate,5) $_fixts Fileserver opened with $nick ( $+ $fserv($nick).ip $+ )
  580. on 1:close:!:if ($fserv($nick).ip == $null) write $_wrapfile($logdirDCC.Log) $left($adate,5) $_fixts Fileserver canceled with $nick | else write $_wrapfile($logdirDCC.Log) $left($adate,5) $_fixts Fileserver closed with $nick ( $+ $fserv($nick).ip $+ )
  581. on 1:filesent:*:{
  582.   set %.num $send(0)
  583.   :loop
  584.   if (($send(%.num) != $nick) || ($send(%.num).file != $nopath($filename))) { if ($_vd(.num) > 0) goto loop | else set %.num $send($nick) }
  585.   write $_wrapfile($logdirDCC.Log) $left($adate,5) $_fixts DCC Send of $filename to $nick ( $+ $send(%.num).ip $+ ) successful ( $+ $send(%.num).cps CPS)
  586. }
  587. on 1:filercvd:*:{
  588.   set %.num $get(0)
  589.   :loop
  590.   if (($get(%.num) != $nick) || ($get(%.num).file != $nopath($filename))) { if ($_vd(.num) > 0) goto loop | else set %.num $get($nick) }
  591.   write $_wrapfile($logdirDCC.Log) $left($adate,5) $_fixts DCC Get of $filename from $nick ( $+ $get(%.num).ip $+ ) successful ( $+ $get(%.num).cps CPS)
  592. }
  593. on 1:sendfail:*:{
  594.   set %.num $send(0)
  595.   :loop
  596.   if (($send(%.num) != $nick) || ($send(%.num).file != $nopath($filename))) { if ($_vd(.num) > 0) goto loop | else set %.num $send($nick) }
  597.   write $_wrapfile($logdirDCC.Log) $left($adate,5) $_fixts DCC Send of $filename to $nick ( $+ $send(%.num).ip $+ ) FAILED ( $+ $send(%.num).sent $+ / $+ $send(%.num).size sent, $send(%.num).pc $+ % $+ , $send(%.num).cps CPS)
  598. }
  599. on 1:getfail:*:{
  600.   set %.num $get(0)
  601.   :loop
  602.   if (($get(%.num) != $nick) || ($get(%.num).file != $nopath($filename))) { if ($_vd(.num) > 0) goto loop | else set %.num $get($nick) }
  603.   write $_wrapfile($logdirDCC.Log) $left($adate,5) $_fixts DCC Get of $filename from $nick ( $+ $get(%.num).ip $+ ) FAILED ( $+ $get(%.num).rcvd $+ / $+ $get(%.num).size sent, $get(%.num).pc $+ % $+ , $get(%.num).cps CPS)
  604. }
  605. #dcclog end
  606. ; -----------------------------------------------------
  607. ; Misc cool windows
  608. ; -----------------------------------------------------
  609. menu @Ping {
  610.   dclick /window -c @Ping
  611.   Reping
  612.   .Standard:ping $_ptarget(d)
  613.   .-
  614.   .Fake ping:fping $_ptarget(d)
  615.   .Version ping:vping $_ptarget(d)
  616.   .Server ping:sping $_ptarget
  617.   Average lag:avglag
  618.   -
  619.   Query:{
  620.     set %.targ $_ptarget
  621.     set %.num $_numtok(44,%.targ)
  622.     :loop
  623.     q $gettok(%.targ,%.num,44)
  624.     if ($_vd(.num) > 0) goto loop
  625.   }
  626.   Chat:{
  627.     set %.targ $_ptarget
  628.     set %.num $_numtok(44,%.targ)
  629.     :loop
  630.     c $gettok(%.targ,%.num,44)
  631.     if ($_vd(.num) > 0) goto loop
  632.   }
  633.   -
  634.   Copy:if ($line(@Ping,0) == 1) clipboard $remove($_stripout($line(@Ping,1)),$chr(160)) | else clipboard $remove($_stripout($sline(@Ping,1)),$chr(160))
  635.   Delete:_ptarget d
  636.   Select all:set %.num $line(@Ping,0) | if (%.num == 0) halt | :loop | sline -a @Ping %.num | if ($_vd(.num) > 0) goto loop
  637.   -
  638.   Configure...:config whoisping
  639.   Window
  640.   .Record position:set %pp.ping $window(@Ping).x $window(@Ping).y $window(@Ping).w $window(@Ping).h
  641.   .Restore position:window @Ping %pp.ping
  642.   .-
  643.   .Default position:set %pp.ping $_winpos(14%,7%,9%,7%) | window @Ping %pp.ping
  644.   -
  645.   Close:window -c @Ping
  646.   Help:help ! ping basket popups
  647. }
  648. menu @Whois {
  649.   dclick /window -c @Whois | q %_last.whois
  650.   Query:window -c @Whois | q %_last.whois
  651.   Chat:window -c @Whois | if (%_last.whoist == is) c %_last.whois | else { disp Attempting to connect via chat to IP of %col.target $+ %_last.whois $+ ... | if ($longip(%_last.whois.addr) != $null) c %_last.whois.addr | else { .enable #-wwdc | .dns %_last.whois.addr } }
  652.   Chat to IP:c %_last.whois.addr
  653.   -
  654.   Join
  655.   .$_tf2any(%^follow.2,All,$null):j %_last.whois.chan
  656.   .-
  657.   .%^follow.1:j %^follow.1
  658.   .%^follow.2:j %^follow.2
  659.   .%^follow.3:j %^follow.3
  660.   .%^follow.4:j %^follow.4
  661.   .%^follow.5:j %^follow.5
  662.   .%^follow.6:j %^follow.6
  663.   .%^follow.7:j %^follow.7
  664.   .%^follow.8:j %^follow.8
  665.   .%^follow.9:j %^follow.9
  666.   .%^follow.10:j %^follow.10
  667.   -
  668.   Ping
  669.   .Standard:ping %_last.whois
  670.   .-
  671.   .Fake ping:fping %_last.whois
  672.   .Version ping:vping %_last.whois
  673.   .Server ping:sping %_last.serv
  674.   -
  675.   User info
  676.   .Extended whois:w " $+ %_last.whois $+ " " $+ %_last.whois $+ "
  677.   .-
  678.   .User central:uwho %_last.whois
  679.   .Address book:abook %_last.whois
  680.   .-
  681.   .Get DNS:dns %_last.whois.addr
  682.   .Get hostmask:host %_last.whoisf
  683.   .Unix finger:finger %_last.whois.identd $+ @ $+ %_last.whois.addr
  684.   User level
  685.   .View:user %_last.whoisf
  686.   .Authorize:auth %_last.whoisf
  687.   .-
  688.   .Level 1 (no access):user %_last.whoisf 1
  689.   .Level 50 (safe):user %_last.whoisf 50
  690.   .Level 75 (protected):user %_last.whoisf 75
  691.   .-
  692.   .Add sublevel
  693.   .."chat"    (auto accept DCC chats):user %_last.whoisf +chat
  694.   .."send"    (auto accept DCC sends):user %_last.whoisf +send
  695.   .."nodcc"    (auto ignore DCCs):user %_last.whoisf +nodcc
  696.   .."voice"    (auto voice user):user %_last.whoisf +voice
  697.   .."op"    (op on ANY channel via password):user %_last.whoisf +op
  698.   .."nopw"    (with "op", ops without password):user %_last.whoisf +nopw
  699.   .Remove sublevel
  700.   .."chat"    (auto accept DCC chats):user %_last.whoisf -chat
  701.   .."send"    (auto accept DCC sends):user %_last.whoisf -send
  702.   .."nodcc"    (auto ignore DCCs):user %_last.whoisf -nodcc
  703.   .."voice"    (auto voice user):user %_last.whoisf -voice
  704.   .."op"    (remove ALL ops access):user %_last.whoisf -op
  705.   .."nopw"    (ops without password):user %_last.whoisf -nopw
  706.   Notify
  707.   .Add to notify (any server)
  708.   ..No address check...:set %_arhelp notify -a %_last.whois %_last.whoisf | _pentry _arhelp Note to use for user's notify?2
  709.   ..Identd check...:set %_arhelp notify -ai %_last.whois %_last.whoisf | _pentry _arhelp Note to use for user's notify?2
  710.   ..Identd + domain check...:set %_arhelp notify -ad %_last.whois %_last.whoisf | _pentry _arhelp Note to use for user's notify?2
  711.   .Add to notify (this server only)
  712.   ..No address check...:set %_arhelp notify -av %_last.whois %_last.whoisf | _pentry _arhelp Note to use for user's notify?2
  713.   ..Identd check...:set %_arhelp notify -aiv %_last.whois %_last.whoisf | _pentry _arhelp Note to use for user's notify?2
  714.   ..Identd + domain check...:set %_arhelp notify -adv %_last.whois %_last.whoisf | _pentry _arhelp Note to use for user's notify?2
  715.   .-
  716.   .Remove from notify:notify -r %_last.whois
  717.   -
  718.   Configure...:config whoisping
  719.   Window
  720.   .Clear:set %.who.file $_ppdir $+ who-temp.txt | if ($exists(%.who.file)) .remove %.who.file | window -c @Whois | tome
  721.   .-
  722.   .Record position:set %pp.whois $window(@Whois).x $window(@Whois).y $window(@Whois).w $window(@Whois).h
  723.   .Restore position:window @Whois %pp.whois
  724.   .-
  725.   .Default position:set %pp.whois $_winpos(14%,7%,7%,9%) | window @Whois %pp.whois
  726.   -
  727.   Copy:set %.cl %_last.whois %_last.whoist %_last.whois.identd $+ @ $+ %_last.whois.addr %_last.whoisr | if ((%_last.whoist == is) && (%_last.whois.chan != $null)) set %.cl $gettok(%.cl,1-3,32) on %_last.whoisc $gettok(%.cl,4-,32) | clipboard %.cl
  728.   Close:window -c @Whois
  729.   -
  730.   Help:help ! whois tome popups
  731. }
  732.